/**
 * This class represents a Player and holds the player's name,
 *  credits, and skill point allocations.
 * @author Stanley Ayzenberg, Araya Zaesim, Michelle Partogi, Adam Perez
 * @version 1.0
 */
public class Player implements java.io.Serializable {

	/**
	 * Field engineerPoints.
	 */
	protected int engineerPoints = 0;

	/**
	 * Field fighterPoints.
	 */
	protected int fighterPoints = 0;

	/**
	 * Field pilotPoints.
	 */
	protected int pilotPoints = 0;

	/**
	 * Field traderPoints.
	 */
	protected int traderPoints = 0;

	/**
	 * Field credits.
	 */
	private int credits = 0;

	/**
	 * Field name.
	 */
	protected String name = null;

	/**
	 * Field ship.
	 */
	private SpaceShip ship = null;
	
	/**
	 * Slots of goods.
	 */
	private static final int SLOTS = 10;

	/**
	 * Field startingGoods.
	 */
	private final int[] startingGoods = new int[SLOTS];
	
	/**
	 * toString method.
	 * @return String
	 */
	public String toString() {
		return "";
	}

	/**
	 * Constructor for Player.
	 * @param name String
	 * @param engineerPoints int
	 * @param fighterPoints int
	 * @param pilotPoints int
	 * @param traderPoints int
	 * @param money int
	 */
	public Player(String name, int engineerPoints, int fighterPoints,
			int pilotPoints, int traderPoints, int money) {
		this.engineerPoints = engineerPoints;
		this.fighterPoints = fighterPoints;
		this.pilotPoints = pilotPoints;
		this.traderPoints = traderPoints;
		this.credits = money;
		this.name = name;
		for (int i = 0; i < SLOTS; i++) {
			startingGoods[i] = 0;
		}
		this.ship = new SpaceShip("Gnat", startingGoods);
		System.out.println("Name: " + this.name);
		System.out.println("Skill Points");
		System.out.println("Pilot: " + this.pilotPoints);
		System.out.println("Fighter: " + this.fighterPoints);
		System.out.println("Trader: " + this.traderPoints);
		System.out.println("Engineer: " + this.engineerPoints);
		System.out.println("Credits: " + this.credits);
		System.out.println("Added Gnat spaceship to inventory");
	}
	
	/**
	 * Returns the player's credits
	
	 * @return The player's credits */
	public int getCredits() {
		return credits;
	}
	
	/**
	 * Sets the player's number of credits
	 * @param money Player's credits
	 */
	public void setCredits(int money) {
		credits = money;
	}
	
	/**
	 * Returns the player's engineer points
	
	 * @return The player's engineer points */
	public int getEngineerPoints() {
		return engineerPoints;
	}
	
	/**
	 * Returns the player's pilot points
	
	 * @return The player's pilot points */
	public int getPilotPoints() {
		return pilotPoints;
	}
	
	/**
	 * Returns the player's trader points
	
	 * @return The player's trader points */
	public int getTraderPoints() {
		return traderPoints;
	}
	
	/**
	 * Returns the player's fighter points
	
	 * @return The player's fighter points */
	public int getFightPoints() {
		return fighterPoints;
	}

	/**
	 * Method getName.
	 * @return String
	 */
	public String getName() {
		return name;
	}

	/**
	 * Method getShip.
	 * @return SpaceShip
	 */
	public SpaceShip getShip() {
		return ship;
	}

	/**
	 * Method setShip.
	 * @param ship SpaceShip
	 */
	public void setShip(SpaceShip ship) {
		this.ship = ship;
	}
	
}
